﻿namespace UnitTests.Domain
{
	using System;
	using Core.Infrastructure;
	using Microsoft.Practices.Unity;

	internal class StubDomainSession : DomainSession
	{
		public StubDomainSession(IUnityContainer container)
		{
			this.Container = container;
		}

		public IUnityContainer Container
		{
			get;
			private set;
		}

		protected override TRepository EnsureRepostory<TRepository>()
		{
			return this.Container.Resolve<TRepository>();
		}

		public override void Flash()
		{
		}
	}
}
